var vm = new Vue({
    el: '#app',
    // 修改Vue变量的读取语法，避免和django模板语法冲突
    delimiters: ['[[', ']]'],
    data: {
        host,
        show_menu:false,
        is_login:false,
        username:''
    },
    mounted(){
        this.username=this.getCookie('username');
        console.log(this.username)
        this.is_login=this.getCookie('is_login');
        console.log(this.is_login)
        //this.is_login=true
    },
    methods: {
        //显示下拉菜单
        show_menu_click:function(){
            this.show_menu = !this.show_menu ;
        },

        getCookie:function(name){
            var r = document.cookie.match("\\b" + name + "=([^;]*)\\b");
            console.log('r ' , r )
            return r ? r[1] : undefined;
        }
    }
});
